//
//  HMDiscoverSearchView.swift
//  weibo
//
//  Created by 杨念川 on 16/8/29.
//  Copyright © 2016年 杨念川. All rights reserved.
//

import UIKit

class HMDiscoverSearchView: UIButton {
    //类方法
    class func searchView() -> HMDiscoverSearchView {
        //通过nib方式创建view
        let view = Bundle.main.loadNibNamed("HMDiscoverSearchView", owner: nil, options: nil)!.last! as! HMDiscoverSearchView
        return view
    }
    override func awakeFromNib() {
        //设置图片和文字的间距
        self.imageEdgeInsets = UIEdgeInsetsMake(0, 10, 0, -10)
        self.titleEdgeInsets = UIEdgeInsetsMake(0, 20, 0, -20)
    }
}
